package com.bestalbum.ui{
	import flash.display.MovieClip;
	import flash.text.TextField;
	import flash.text.TextFormat;

	public class Book extends MovieClip{
		private var tf:TextField;
		public function Book(){
			this.x = -50;
			this.y = -70;
			tf = new TextField();
			tf.x = 70;
			tf.y = 75;
			tf.multiline = true;
			tf.wordWrap = true;
			tf.width = 500;// tf.width = (this.stage.stageWidth)?this.stage.stageWidth:500;
			tf.height = 390; // tf.height = (this.stage.stageHeight)?this.stage.stageHeight:450;
			tf.text = "";
			var format:TextFormat = new TextFormat();
			format.font = "_sans";
			format.size = 4;
			format.leading = -10;
			tf.setTextFormat(format);
			addChild(tf);
			super();
		}
		
		public function addText(txt:String, append:Boolean){
			if (append) tf.appendText(txt + "\n");
			else tf.text = txt;
		}
	}
}